package com.neudu.ssrs_yyzxservice.config;

import com.neudu.ssrs_yyzxservice.interceptor.UserInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurationSupport;
@Configuration
public class SpringConfig extends WebMvcConfigurationSupport {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        InterceptorRegistration interceptorRegistration = registry.addInterceptor(new UserInterceptor());
        interceptorRegistration.addPathPatterns("/**")
                .excludePathPatterns("/login","login");
    }
}
